# Project Needs a name ofcourse
project(plasma-gx_mail_notify)
 
# Find the required Libaries
find_package(KDE4 REQUIRED)
include(KDE4Defaults)
 
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
	${CMAKE_SOURCE_DIR}
	${CMAKE_BINARY_DIR}
	${KDE4_INCLUDES}
)
 
# We add our source code here
set(gx_mail_notify_SRCS
	plasma-gx_mail_notify.cpp
	list_account_item.cpp
	account.cpp
	mail_checker.cpp
	appearance_dialog.cpp
	config_dialog.cpp
	account_dialog.cpp
	messages_dialog.cpp
	certificate_details_dialog.cpp
	messages_dialog_item.cpp
	mail_checker_view.cpp
	itemdelegate.cpp
)
 
# Now make sure all files get to the right place
kde4_add_ui_files(gx_mail_notify_SRCS appearance_dialog.ui config_dialog.ui account_dialog.ui certificate_details_dialog.ui)
kde4_add_plugin(plasma_applet_gx_mail_notify ${gx_mail_notify_SRCS})

target_link_libraries(plasma_applet_gx_mail_notify 
		${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTNETWORK_LIBRARY})
 
install(TARGETS plasma_applet_gx_mail_notify
		DESTINATION ${PLUGIN_INSTALL_DIR})
 
install(FILES plasma-applet-gx_mail_notify.desktop
		DESTINATION ${SERVICES_INSTALL_DIR})

install(FILES gx_mail_notify-normal.svg gx_mail_notify-icon_error.svg gx_mail_notify-icon_new.svg
		DESTINATION ${DATA_INSTALL_DIR}/desktoptheme/default/widgets/)
